package com.psbc.redis_study.dao;

import com.psbc.redis_study.model.VideoDo;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.Map;

@Repository
public class VideoDao {

    private static Map<Integer,VideoDo> map = new HashMap<>();
    static {
        map.put(1, new VideoDo(1, "⼯业级PaaS云平台 + SpringCloudAlibaba 综合项⽬实战(完结)","https://xdclass.net",1099));
        map.put(2, new VideoDo(2, "玩转新版⾼性能RabbitMQ容器化分布式集群实战","https://xdclass.net",79));
        map.put(3, new VideoDo(3, "新版后端提效神器MybatisPlus + SwaggerUI3.X + Lombok","https://xdclass.net ",49));
        map.put(4, new VideoDo(4, "玩转Nginx分布式架构实战教程 零基础到⾼级","https://xdclass.net",49));
        map.put(5, new VideoDo(5, "ssm新版SpringBoot2 .3 / spring5 / mybatis3 "," https:xdclass.net ",49));
        map.put(6, new VideoDo(6, "新⼀代微服务全家桶AlibabaCloud + SpringCloud实战","https://xdclass.net",59));
    }
    /**
     * 模拟从数据库找
     *
     * @param videoId
     * @return json⼯具类
     */
    public VideoDo findDetailById(int videoId) {
        return map.get(videoId);
    }
}
